package com.tac.pojo;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.Scope;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Null;
import java.time.LocalDateTime;

@Data
@ApiModel
public class Comment {
    @ApiModelProperty(value = "主键" ,required = true)
    private Integer id;

    @NotNull(message = "评价文字不能为空" )
    @ApiModelProperty(value = "评价文字" ,required = true)
    private String evaluate;//评价文字


    @ApiModelProperty(value = "商品评分",required = true)
    @NotNull(message = "商品评分不能为空")
    private Integer productScore;//商品评分

    @ApiModelProperty(value = "服务评分",required = true)
    @NotNull(message = "服务评分不能为空")
    private Integer serviceScore;//服务评分

    @NotNull(message = "商品id不能为空")
    @ApiModelProperty(value = "商品id",required = true)
    private Integer productId;

    @NotNull(message = "订单id不能为空")
    @ApiModelProperty(value = "订单id",required = true)
    private Integer orderId;

    @ApiModelProperty("图片")
    private String img;//图片


    @ApiModelProperty(value = "用户id",required = false)
    private Integer userId;


    @JsonFormat(shape = JsonFormat.Shape.STRING)
    @ApiModelProperty(value = "创建时间",required = false)
    private LocalDateTime createTime;


    @ApiModelProperty(value = "用户名",required = false)
    private String userName;


    @ApiModelProperty(value = "用户头像",required = false)
    private String headPortrait;
}
